package com.etc.youkeshoppingssm.controller;

import com.etc.youkeshoppingssm.entity.User;
import com.etc.youkeshoppingssm.service.IUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserController {
    private final static Logger logger = LoggerFactory.getLogger(UserController.class);
    @Autowired
    private IUserService service;
    @RequestMapping("/findOfUser")
    @ResponseBody
    public User findOfUser(){
        int id = 1;
        System.out.println("userController ........");
        User user = service.findOfUser(id);
        return user;
    }
    @RequestMapping("/hello")
    public String getHello(){
        System.out.println("EH");
        return "Hello";
    }
}
